projects
/
gpsbabel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
920f2ca
)
Terminate read buffer.
author
oliskoli
<oliskoli>
Mon, 27 Nov 2006 23:43:24 +0000
(23:43 +0000)
committer
oliskoli
<oliskoli>
Mon, 27 Nov 2006 23:43:24 +0000
(23:43 +0000)
coastexp.c
patch
|
blob
|
history
diff --git
a/coastexp.c
b/coastexp.c
index 8da17a061530613fe4693624ec1cdb0613f5e6df..acb70996e231e398536beb3f5250b0ed51c479a3 100755
(executable)
--- a/
coastexp.c
+++ b/
coastexp.c
@@
-332,9
+332,10
@@
void
ce_read(void)
{
int len;
- char buf[MY_CBUF];
+ char buf[MY_CBUF
+ 1
];
- while ((len = gbfread(buf, 1, sizeof(buf), fd))) {
+ while ((len = gbfread(buf, 1, sizeof(buf) - 1, fd))) {
+ buf[len] = '\0';
if (!XML_Parse(psr, buf, len, gbfeof(fd))) {
fatal(MYNAME ":Parse error at %d: %s\n",
(int) XML_GetCurrentLineNumber(psr),